<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.thymeleaf.org/thymeleaf-extras-shiro">
<head>
  <meta charset="UTF-8">
  <title>Shiro-Springboot 首页</title>
</head>
<body>

<h1>Hello [[${msg}]]</h1>
<p th:text="${msg}"></p>

<div shiro:hasPermission="user:add">
  <a th:href="@{/user/add}"> add </a>
</div>
|
<div shiro:hasPermission="user:update">
  <a th:href="@{/user/update}"> update </a>
</div>

<div shiro:hasRole="admin">
  Admin 角色可见
</div>

<div shiro:hasRole="root">
  Root 角色可见
</div>

<div shiro:hasRole="guest">
  Guest 角色可见
</div>

<br>
<hr>

<a th:href="@{/logout}">退出</a>

</body>
</html>
